package com.demo.service.impl;

import com.demo.entity.User;
import com.demo.mapper.UserMapper;
import com.demo.service.UserService;

import java.util.List;

public class UserServiceImpl implements UserService{
	//service������dao(mapper)
	private UserMapper userMapper;
	public void setUserMapper(UserMapper userMapper) {
		this.userMapper = userMapper;
	}

	@Override
	public User queryUserLogin(String username, String password) {
		return userMapper.queryUserLogin(username, password);
	}

	@Override
	public User queryUserLoginByEmail(String email) {
		return userMapper.queryUserLoginByEmail(email);
	}

	@Override
	public void insertUserRegister(String email, String username, String password) {
		userMapper.insertUserRegister(email,username, password);
	}

	@Override
	public List<User> queryUserInfo() {
		return userMapper.queryUserInfo();
	}

	@Override
	public void delUserInfo(String delID) {
		userMapper.delUserInfo(delID);
	}

	@Override
	public void updateUserPower(String uid, int ustate, int utype) {
		userMapper.updateUserPower(uid, ustate, utype);
	}

	
}
